<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>交易数据</title>
    <link href="layui/css/layui.css" rel="stylesheet" media="all">
    <script src="layui/layui.js"></script>
</head>
<body>
<!--工具条-->
<script type="text/html" id="tradeToolBar">
    <div style="float:right">
        <button class="layui-btn layui-btn-sm" lay-event="insertTrade">
            <i class="layui-icon">&#xe654;</i>新增</button>
        <button class="layui-btn layui-btn-sm" lay-event="deleteAllSeat">
            <i class="layui-icon">&#xe640;</i>批量删除</button>
    </div>

    <div class="layui-inline" style="position: relative;left: 30px;">
        <label class="layui-form-label" style="width: 90px">成交日期</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="dealDate1" name="tradeDate" placeholder="成交日期">
        </div>
    </div>
    <div class="layui-inline" style="position: relative;left: 30px;">
        <label class="layui-form-label" style="width: 90px">证券名称</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="securityNames" name="securityId" placeholder="请输入证券名称">
            <input type="text" id="securityId" hidden="true">
        </div>
    </div>
    <div class="layui-inline layui-show-xs-block">
        <button class="layui-btn layui-btn-primary" lay-event="searchTrade" lay-submit="searchTrade" lay-filter="searchTrade"><i class="layui-icon">&#xe615;</i>搜索</button>
    </div>
</script>
<!--JSON数据-->
<script type="text/javascript">
    layui.use(['table','form','laydate','tableSelect','layer'], function(){
        var table = layui.table;
        var $ = layui.jquery;
        var form = layui.form;
        var tableSelect = layui.tableSelect;
        var laydate = layui.laydate;
        var layer = layui.layer;
        laydate.render({
            elem: '#dealDate2' //增加成交日期
        });
        laydate.render({
            elem: '#dealSettlementDate1' //增加结算日期
        });
        laydate.render({
            elem: '#updateTradeDate' //修改成交日期
        });
        laydate.render({
            elem: '#updateSettleDate' //修改结算日期
        });

        table.render({
            elem: '#trade',
            id:'trade',
            url: 'selectTrade',
            page: true,
            height:'full-20',
            /*height:'full-90',*/
            toolbar: '#tradeToolBar',//显示在表头的工具条
            cellMinWidth: 60,
            limits:[1,2,3,4,5,6,7,8,9,10],
            cols: [[ //表头
                    {type: 'checkbox', fixed: 'left'}
                    ,{field: 'tradeId', title: '交易编号',align:'center', hide: true}
                    ,{field: 'fundId', title: '基金编号',  align:'center', hide: true}
                    ,{field: 'seatName', title: '席位名称',  align:'center'}
                    ,{field: 'tradeDate',title: '成交日期',   align:'center'}
                    ,{field: 'tradeNum',title: ' 交易数量',  align:'center'}
                    ,{field: 'tradePrice', title: '交易单价',  align:'center'}
                    ,{field: 'tradeMoney',title: '交易金额',  align:'center'}
                    ,{field: 'settleMoney',title: '结算金额',   align:'center'}
                    ,{field: 'settleDate',title: '结算日期',   align:'center'}
                    ,{field: 'accounName', title: '现金账户',  align:'center'}
                    ,{field: 'securityName', title: '证券名称',  align:'center'}
                    ,{field: 'brokerName', title: '券商名称',  align:'center', hide: true}
                    ,{field: 'tradeType', title: '交易类型', align:'center',templet:function (item){
                        if (item.tradeType == '1'){
                            return '买入';
                        }else if (item.tradeType == '2'){
                            return '卖出';
                        }else if (item.tradeType == '3'){
                            return '分红';
                        }else if (item.tradeType == '4'){
                            return "送股";
                            }
                        }
                    }
                    ,{field: 'settleState',title: '结算状态', align:'center',templet:function (item){
                            if (item.settleState == '2'){
                                return '未结算';
                            }else if (item.settleState == '1'){
                                return '已结算';
                            }
                        }
                    }
                    ,{field: 'boodInterest',title: '债券利息',   align:'center', hide: true}
                    ,{field: 'stampDuty',title: '印花税',   align:'center', hide: true}
                    ,{field: 'transferFee',title: '过户费',   align:'center', hide: true}
                    ,{field: 'collectionFee',title: '征管费',  align:'center', hide: true}
                    ,{field: 'handlingFee',title: '经手费',   align:'center', hide: true}
                    ,{field: 'fees',title: '佣金费用',   align:'center', hide: true}
                    ,{fixed: 'right',width: 165, align:'center', toolbar: '#barDemo'}//编辑删除的按钮
                ]]
        });
        //成交日期绑定事件
        laydate.render({
            elem: '#dealDate1'
        });
        //给工具栏绑定事件
        table.on('toolbar(trade)', function(obj) {
            //根据事件对象 来判定点击的是哪一个按钮
            if(obj.event=='insertTrade'){
                layer.open({
                    type:1, //iframe 内嵌窗口
                    title: '新增交易数据信息',
                    area:['700px','650px'],
                    content: $("#addContent")
                });
            }else if(obj.event=='searchTrade') {
                var securityId = $('#securityId').val();
                var securityNames = $('#securityNames').val();
                table.reload('trade', {
                    url: 'selectTrade'
                    , page: {
                        curr: 1
                    }
                    , where: {
                        'securityId':securityId
                    }
                });
                laydate.render({
                    elem: '#dealDate1'
                });
                tableSelect.render({
                    elem:'#securityNames',
                    checkedKey:'securityNames',
                    table:{
                        url:'select',
                        cellMinWidth: 60,
                        cols:[
                            [   {type:'radio'},
                                {field:'securityId',title:'证券Id',width:200},
                                {field: 'securityName',title:'证券名称',width: 200},
                            ]
                        ]
                    },
                    done:function (elem,data) {
                        //elem:返回之前input对象；data:表格返回的选中的数据 []
                        var newJson=[];
                        //遍历选中的数据
                        $.each(data.data,function (index,item) {
                            newJson.push(item);
                            $("#securityId").val(item.securityId);
                            $("#securityNames").val(item.securityName);
                        });
                        /*elem.val(newJson.join(","));*/ //给输入框里显示的值赋值
                    }
                });
                $("#securityNames").val(securityNames);
            }
        });

        //给最右边的列 修改事件
        table.on('tool(trade)', function (obj) {
            switch (obj.event) {
                case "editTrade":
                    //得到选中行的数据
                    var data = obj.data;
                    //JSON.stringify(data)  拼接成JSON格式的字符串
                    var seatObj = $.parseJSON(JSON.stringify(data));
                    //弹出一个修改的窗口
                    form.val("editform", seatObj);
                    layer.open({
                        type: 1, //iframe 内嵌窗口
                        title: '修改交易数据信息',
                        area: ['700px','650px'],
                        content: $("#editContent")
                    });
                    break;
                case "deleteTrade":
                    layer.confirm('确定要删除吗？',function (index){
                        layer.close(index);
                        var data = obj.data;
                        var seatObj = $.parseJSON(JSON.stringify(data));
                        $.post(
                            "/deleteTrade",
                            seatObj,
                            function (msg) {
                                //重新刷新表格
                                table.reload('trade');
                            });
                    });
                    break;
            };
        });
        //给增加的form绑定提交事件
        form.on('submit(addform)', function () {
            //发送ajax请求到 服务器，
            //得到表单的所有数据
            var formData = form.val("addform");
            $.post(
                "/insertTrade",
                formData,
                function (msg) {
                    //重新刷新表格
                    //给予提示信息，修改成功
                    alert(msg);
                });
            /*return false;*/
          /*  table.reload('trade');
            table.reload('addform');*/
            table.reload('trade');
            table.reload('addform');
        });
        //给修改的form绑定提交事件
        form.on('submit(editform)', function () {
            //发送ajax请求到 服务器，
            //得到表单的所有数据
            var formData = form.val("editform");
            $.post(
                "/updateTrade",
                formData,
                function (msg) {
                    //重新刷新表格
                    //给予提示信息，修改成功
                    alert(msg);

                });
            table.reload('trade');
            table.reload('editform');
        });



        tableSelect.render({
            elem:'#securityNames',
            checkedKey:'securityNames',
            table:{
                url:'select',
                cellMinWidth: 60,
                cols:[
                    [   {type:'radio'},
                        {field:'securityId',title:'证券Id',width:200},
                        {field: 'securityName',title:'证券名称',width: 200},
                    ]
                ]
            },
            done:function (elem,data) {
                //elem:返回之前input对象；data:表格返回的选中的数据 []
                var newJson=[];
                //遍历选中的数据
                $.each(data.data,function (index,item) {
                    newJson.push(item);
                    $("#securityId").val(item.securityId);
                    $("#securityNames").val(item.securityName);
                });
                /*elem.val(newJson.join(","));*/ //给输入框里显示的值赋值
            }
        });

        <!--增加下拉表格-->
        //交易数据添加中的证券Id的下拉表单
        tableSelect.render({
            elem:'#securityName',
            checkedKey:'securityName',
            table:{
                url:'select',
                cellMinWidth: 60,
                cols:[
                    [   {type:'radio'},
                        {field:'securityId',title:'证券Id',width:200},
                        {field: 'securityName',title:'证券名称',width: 200},
                        {field: 'securitType',title:'证券类型',width: 200},
                        {field: 'exchangeName',title:'交易所',width: 200},
                    ]
                ]
            },
            done:function (elem,data) {
                //elem:返回之前input对象；data:表格返回的选中的数据 []
                var newJson=[];
                //遍历选中的数据
                $.each(data.data,function (index,item) {
                    newJson.push(item);
                    $("#securityId1").val(item.securityId);
                    $("#securityName").val(item.securityName);
                    $("#securitType").val(item.securitType);
                    $("#exchangeName").val(item.exchangeName);
                });
                /*elem.val(newJson.join(","));*/ //给输入框里显示的值赋值
            }
        });
        //交易数据添加中的现金账户的下拉表单
        tableSelect.render({
            elem:'#accounName',
            checkedKey:'accounName',
            table:{
                url:'pageCash',
                cellMinWidth: 60,
                cols:[
                    [   {type:'radio'},
                        {field:'cashId',title:'现金ID',width:200},
                        {field: 'accounName',title:'账户名称',width: 200},
                    ]
                ]
            },
            done:function (elem,data) {
                //elem:返回之前input对象；data:表格返回的选中的数据 []
                var newJson=[];
                //遍历选中的数据
                $.each(data.data,function (index,item) {
                    newJson.push(item);
                    $("#cashId").val(item.cashId);
                    $("#accounName").val(item.accounName);
                });
                /*elem.val(newJson.join(","));*/ //给输入框里显示的值赋值
            }
        });
        //交易数据添加中的券商的下拉表单
        tableSelect.render({
            elem:'#brokerName',
            checkedKey:'brokerName',
            table:{
                url:'selectBroker',
                cellMinWidth: 60,
                cols:[
                    [   {type:'radio'},
                        {field:'brokerId',title:'券商编号',width:200},
                        {field: 'brokerName',title:'券商名称',width: 200},
                        {field: 'brokerDesc',title:'券商说明',width: 200},
                    ]
                ]
            },
            done:function (elem,data) {
                //elem:返回之前input对象；data:表格返回的选中的数据 []
                var newJson=[];
                //遍历选中的数据
                $.each(data.data,function (index,item) {
                    newJson.push(item);
                    $("#brokerId").val(item.brokerId);
                    $("#brokerName").val(item.brokerName);
                });
                /*elem.val(newJson.join(","));*/ //给输入框里显示的值赋值
            }
        });
        //交易数据添加中的交易席位的下拉表单
        tableSelect.render({
            elem:'#seatName',
            checkedKey:'seatName',
            table:{
                url:'selectTradingSeats?seatType=3',
                cellMinWidth: 60,
                cols:[
                    [   {type:'radio'},
                        {field:'seatId',title:'席位编号',width:200},
                        {field: 'seatName',title:'席位名称',width: 200},
                        {field: 'commission',title:'佣金利率',width: 200},
                        {field: 'brokerName',title:'券商名称',width: 200},
                        {field: 'seatPlace',title:'席位地点',width: 200},
                    ]
                ]
            },
            done:function (elem,data) {
                //elem:返回之前input对象；data:表格返回的选中的数据 []
                var newJson=[];
                //遍历选中的数据
                $.each(data.data,function (index,item) {
                    newJson.push(item);
                    $("#seatId").val(item.seatId);
                    $("#seatName").val(item.seatName);
                });
                /*elem.val(newJson.join(","));*/ //给输入框里显示的值赋值
            }
        });


        <!--修改下拉表格-->
        //交易修改中的证券代码的下拉表单
        tableSelect.render({
            elem: '#updateSecurityName',
            checkedKey: 'updateSecurityName',
            table:{
                url:'select',
                cellMinWidth: 60,
                cols:[
                    [   {type:'radio'},
                        {field:'securityId',title:'证券Id',width:200},
                        {field: 'securityName',title:'证券名称',width: 200},
                        {field: 'securitType',title:'证券类型',width: 200},
                        {field: 'exchangeName',title:'交易所',width: 200},
                    ]
                ]
            },
            done:function (elem,data) {
                //elem:返回之前input对象；data:表格返回的选中的数据 []
                var newJson=[];
                //遍历选中的数据
                $.each(data.data,function (index,item) {
                    newJson.push(item);
                    $("#updateSecurityId").val(item.securityId);
                    $("#updateSecurityName").val(item.securityName);
                });
            }
        });
        //交易数据修改中的现金账户的下拉表单
        tableSelect.render({
            elem:'#accounName2',
            checkedKey:'accounName',
            table:{
                url:'pageCash',
                cellMinWidth: 60,
                cols:[
                    [   {type:'radio'},
                        {field:'cashId',title:'现金ID',width:200},
                        {field: 'accounName',title:'账户名称',width: 200},
                    ]
                ]
            },
            done:function (elem,data) {
                //elem:返回之前input对象；data:表格返回的选中的数据 []
                var newJson=[];
                //遍历选中的数据
                $.each(data.data,function (index,item) {
                    newJson.push(item);
                    $("#cashId2").val(item.cashId);
                    $("#accounName2").val(item.accounName);
                });
                /*elem.val(newJson.join(","));*/ //给输入框里显示的值赋值
            }
        });
        //交易数据修改中的券商Id的下拉表单
        tableSelect.render({
            elem:'#updateBrokerName',
            checkedKey:'updateBrokerName',
            table:{
                url:'selectBroker',
                cellMinWidth: 60,
                cols:[
                    [   {type:'radio'},
                        {field:'brokerId',title:'券商编号',width:200},
                        {field: 'brokerName',title:'券商名称',width: 200},
                        {field: 'brokerDesc',title:'券商说明',width: 200},
                    ]
                ]
            },
            done:function (elem,data) {
                //elem:返回之前input对象；data:表格返回的选中的数据 []
                var newJson=[];
                //遍历选中的数据
                $.each(data.data,function (index,item) {
                    newJson.push(item);
                    $("#updateBrokerId").val(item.brokerId);
                    $("#updateBrokerName").val(item.brokerName);
                });
                /*elem.val(newJson.join(","));*/ //给输入框里显示的值赋值
            }
        });
        //交易数据修改中的交易席位的下拉表单
        tableSelect.render({
            elem:'#updateSeatName',
            checkedKey:'updateSeatName',
            table:{
                url:'selectTradingSeats?seatType=3',
                cellMinWidth: 60,
                cols:[
                    [   {type:'radio'},
                        {field:'seatId',title:'席位编号',width:200},
                        {field: 'seatName',title:'席位名称',width: 200},
                        {field: 'commission',title:'佣金利率',width: 200},
                        {field: 'brokerName',title:'券商名称',width: 200},
                        {field: 'seatPlace',title:'席位地点',width: 200},
                    ]
                ]
            },
            done:function (elem,data) {
                //elem:返回之前input对象；data:表格返回的选中的数据 []
                var newJson=[];
                //遍历选中的数据
                $.each(data.data,function (index,item) {
                    newJson.push(item);
                    $("#updateSeatId").val(item.seatId);
                    $("#updateSeatName").val(item.seatName);
                });
                /*elem.val(newJson.join(","));*/ //给输入框里显示的值赋值
            }
        });
        //新增的焦点事件
        $(function () {
            $('#tradePrice').focus(function ()//得到教室时触发的时间
            {
                var securityName = $("#securityName").val();
                if(securityName==''){
                    /*layer.msg('请选择证券');*/
                    alert("请选择证券")
                    return false;
                }
            })
            $('#tradeNum').blur(function () //失去焦点时触发的时间
            {
                var securityName = $("#securityName").val();
                var securitType = $("#securitType").val();
                var exchangeName = $("#exchangeName").val();
                var tradePrice = $("#tradePrice").val(); //得到交易单价
                var tradeNum = $("#tradeNum").val(); //得到交易数量
                var tradeType = $("#tradeType").val(); //得到交易类型
                var securityId = $("#securityId1").val();
                if(securityName==''){
                    /*layer.msg('请选择证券');*/
                    alert("请选择证券")
                    return false;
                }else {
                    $.get('sumTrade'
                        ,"securitType="+securitType+"&exchangeName="+exchangeName+"&tradePrice="+tradePrice+"&tradeNum="+tradeNum+"&tradeType="+tradeType+"&securityId="+securityId,
                        function(msg) {
                        alert(msg.settleMoney)
                        $("#tradeMoney").val(msg.tradeMoney);
                        $("#settleMoney").val(msg.settleMoney);
                        $("#stampDuty").val(msg.stampDuty);
                        $("#transferFee").val(msg.transferFee);
                        $("#collectionFee").val(msg.collectionFee);
                        $("#handlingFee").val(msg.handlingFee);
                        $("#fees").val(msg.fees);
                        $("#boodInterest").val(msg.boodInterest);
                        });
                }
            })
        })
        //修改的焦点事件
        $(function () {
            $('#tradePrice2').focus(function ()//得到教室时触发的时间
            {
                var securityName = $("#securityName").val();
                if(securityName==''){
                    /*layer.msg('请选择证券');*/
                    alert("请选择证券")
                    return false;
                }
            })
            $('#tradeNum2').blur(function () //失去焦点时触发的时间
            {
                var securityName = $("#securityName").val();
                var securitType = $("#securitType").val();
                var exchangeName = $("#exchangeName").val();
                var tradePrice = $("#tradePrice2").val(); //得到交易单价
                var tradeNum = $("#tradeNum2").val(); //得到交易数量
                var tradeType = $("#tradeType2").val(); //得到交易类型
                var securityId = $("#updateSecurityId").val();
                if(securityName==''){
                    /*layer.msg('请选择证券');*/
                    alert("请选择证券")
                    return false;
                }else {
                    $.get('sumTrade'
                        ,"securitType="+securitType+"&exchangeName="+exchangeName+"&tradePrice="+tradePrice+"&tradeNum="+tradeNum+"&tradeType="+tradeType+"&securityId="+securityId,
                        function(msg) {
                            alert(msg.settleMoney)
                            $("#tradeMoney2").val(msg.tradeMoney);
                            $("#settleMoney2").val(msg.settleMoney);
                            $("#stampDuty2").val(msg.stampDuty);
                            $("#transferFee2").val(msg.transferFee);
                            $("#collectionFee2").val(msg.collectionFee);
                            $("#handlingFee2").val(msg.handlingFee);
                            $("#fees2").val(msg.fees);
                            $("#boodInterest2").val(msg.boodInterest);
                        });
                }
            })
        })
    });
</script>
<!--存储json数据的表格-->
<table id="trade" lay-filter="trade"></table>

<div style="display: none" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="editTrade">
        <i class="layui-icon">&#xe642;</i>编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="deleteTrade">
        <i class="layui-icon">&#xe642;</i>删除</a>
</div>


<!--增加交易数据表单div块-->
<div id="addContent"
     style="display: none; height: 100%; height: 100%; text-align: center;">
    <!--form表单 lay-filter 绑定事件 若有多个form 筛选作用-->
    <form id="addform" lay-filter="addform" class="layui-form layui-form-pane"  style="margin: 30px auto; display: inline-block;">
        <input type="hidden" placeholder="交易ID" name="tradeId" id="tradeId" value="005">
        <input type="hidden" placeholder="证券编号" name="securityId" id="securityId1">
        <input type="hidden" placeholder="证券类型" name="securitType" id="securitType">
        <input type="hidden" placeholder="交易所" name="exchangeName" id="exchangeName">
        <input type="hidden" placeholder="账户ID" name="cashId" id="cashId" value="0001">
        <input type="hidden" placeholder="券商编号" name="brokerId" id="brokerId">
        <input type="hidden" placeholder="席位Id" name="seatId" id="seatId">
        <input type="hidden" placeholder="基金编号" name="fundId" id="fundCode" value="002">
        <!--<input type="hidden" placeholder="结算状态" name="settleState" id="settleState" value="未结算">-->
        <div class="layui-inline layui-show-xs-block" style="text-align: center;">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">证券名称</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="证券ID" name="securityName" id="securityName">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">现金编号</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="现金ID" name="accounName" id="accounName">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">券商名称</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="券商ID" name="brokerName" id="brokerName">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">席位名称</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="席位ID" name="seatName" id="seatName">
            </div>
        </div>
        <br>
        <br>
        <div class="grid-demo grid-demo-bg1">
            <div class="layui-form-item" >
                <label class="layui-form-label layui-bg-gray" style="text-align: center">交易类型</label>
                <div class="layui-input-inline">
                    <select name="tradeType" lay-verify="required" id="tradeType" onblur="myNum()">
                        <option value="1">买入</option>
                        <option value="2">卖出</option>
                        <option value="3">分红</option>
                        <option value="4">送股</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">交易单价</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入交易单价" name="tradePrice" id="tradePrice" >
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">成交日期</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="请输入成交日期" name="tradeDate" id="dealDate2">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">交易数量</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入交易数量" name="tradeNum" id="tradeNum" onblur="myNum()">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">结算日期</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="请输入结算日期" name="settleDate" id="dealSettlementDate1">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block" style="text-align: center">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">交易金额</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="请输入交易金额" name="tradeMoney" id="tradeMoney">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">结算金额</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入结算金额" name="settleMoney" id="settleMoney">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">佣金费用</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入佣金费用" name="fees" id="fees" >
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">过户费</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入过户费" name="transferFee" id="transferFee">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">印花税</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入印花税" name="stampDuty" id="stampDuty">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">征管费</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入征管费" name="collectionFee" id="collectionFee">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">经手费</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入经手费" name="handlingFee" id="handlingFee">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">证券利息</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入证券利息" name="boodInterest" id="boodInterest">
            </div>
        </div>
        <br>
        <br>

        <div style="position: absolute; left: 38%; bottom: 30px;">
            <button class="layui-btn" lay-submit="add" lay-filter="addsubmit">
                <i class="layui-icon">&#x1005;</i>新增
            </button>
            <button class="layui-btn layui-btn-primary" type="button" onclick="myclose()" style="background-color: orange;color: aliceblue">
                <i class="layui-icon">&#x1006;</i>取消
            </button>
        </div>
    </form>
</div>

<!-- 券商的修改div块 -->
<div id="editContent"
     style="display: none; height: 100%; height: 100%; text-align: center;">
    <!--form表单 lay-filter 绑定事件 若有多个form 筛选作用-->
    <form id="editform" lay-filter="editform" class="layui-form layui-form-pane"  style="margin: 30px auto; display: inline-block;">
        <input type="hidden" placeholder="交易ID" name="tradeId" id="tradeId2" value="005">
        <input type="hidden" placeholder="证券编号" name="securityId" id="updateSecurityId">
        <input type="hidden" placeholder="证券类型" name="securitType" id="securitType2">
        <input type="hidden" placeholder="交易所" name="exchangeName" id="exchangeName2">
        <input type="hidden" placeholder="账户ID" name="cashId" id="cashId2" value="0001">
        <input type="hidden" placeholder="券商编号" name="brokerId" id="updateBrokerId">
        <input type="hidden" placeholder="席位Id" name="seatId" id="updateSeatId">
        <input type="hidden" placeholder="基金编号" name="fundId" id="fundCode2" value="002">

<!--        <input type="hidden" placeholder="结算状态" name="settleState" id="settleState2" value="未结算">-->
        <div class="layui-inline layui-show-xs-block" style="text-align: center;">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">证券名称</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="证券ID" name="securityName" id="updateSecurityName">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">现金编号</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="现金ID" name="accounName" id="accounName2">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">券商名称</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="券商ID" name="brokerName" id="updateBrokerName">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">席位名称</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="席位ID" name="seatName" id="updateSeatName">
            </div>
        </div>
        <br>
        <br>
        <div class="grid-demo grid-demo-bg1">
            <div class="layui-form-item" >
                <label class="layui-form-label layui-bg-gray" style="text-align: center">交易类型</label>
                <div class="layui-input-inline">
                    <select name="tradeType" lay-verify="required" id="tradeType2" onblur="myNum()">
                        <option value="1">买入</option>
                        <option value="2">卖出</option>
                        <option value="3">分红</option>
                        <option value="4">送股</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">交易单价</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入交易单价" name="tradePrice" id="tradePrice2" >
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">成交日期</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="请输入成交日期" name="tradeDate" id="updateTradeDate">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">交易数量</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入交易数量" name="tradeNum" id="tradeNum2" onblur="myNum()">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">结算日期</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="请输入结算日期" name="settleDate" id="updateSettleDate">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block" style="text-align: center">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">交易金额</label>
            <div class="layui-inline layui-show-xs-block">
                <input class="layui-input" placeholder="请输入交易金额" name="tradeMoney" id="tradeMoney2">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">结算金额</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入结算金额" name="settleMoney" id="settleMoney2">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">佣金费用</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入佣金费用" name="fees" id="fees2" >
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">过户费</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入过户费" name="transferFee" id="transferFee2">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">印花税</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入印花税" name="stampDuty" id="stampDuty2">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">征管费</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入征管费" name="collectionFee" id="collectionFee2">
            </div>
        </div>
        <br>
        <br>
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">经手费</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入经手费" name="handlingFee" id="handlingFee2">
            </div>
        </div>
        &nbsp&nbsp&nbsp&nbsp&nbsp
        <div class="layui-inline layui-show-xs-block">
            <label class="layui-form-label layui-bg-gray" style="text-align: center">证券利息</label>
            <div class="layui-inline layui-show-xs-block" style="width: 182px">
                <input class="layui-input" placeholder="请输入证券利息" name="boodInterest" id="boodInterest2">
            </div>
        </div>
        <br>
        <br>

        <div style="position: absolute; left: 38%; bottom: 30px;">
            <button class="layui-btn" lay-submit="edit" lay-filter="editsubmit">
                <i class="layui-icon">&#x1005;</i>修改
            </button>
            <button class="layui-btn layui-btn-primary" type="button" onclick="myclose()" style="background-color: orange;color: aliceblue">
                <i class="layui-icon">&#x1006;</i>取消
            </button>
        </div>
    </form>
</div>
</body>
</html>